﻿using System;
using System.Collections.Generic;
using System.Configuration;
using System.Linq;
using System.Web;

namespace YQGL.Common
{
    /// <summary>
    /// 全局变量
    /// </summary>
    public class GlobalConstant
    {
        ///// <summary>
        ///// 密钥加密串值
        ///// </summary>
        public const string GLOBAL_ENCRYPTVALUE = "ELINGSOFT_ABCDEFGHIJKLMNSTOPQ";
        /// <summary>
        /// 登录ID变量名
        /// </summary>
        public static readonly string PARAM_LOGINID = "LoginID";
        /// <summary>
        /// 登录部门编号变量名
        /// </summary>
        public static readonly string PARAM_USERNAME = "UserName";

        /// <summary>
        /// 当前城市
        /// </summary>
        public static readonly string PARAM_CITY = "City";
        /// <summary>
        /// 当前建立连接的对象(一个对象多个连接)
        /// </summary>
        public static Dictionary<string, List<string>> CLIENT_LIST = new Dictionary<string, List<string>>();
        /// <summary>
        /// 当前建立连接的对象的对应session的值列表
        /// </summary>
        public static Dictionary<string, string> SESSION_USER_LIST = new Dictionary<string, string>();

        public static readonly string PARAM_PRVFUNCTIONLIST = "PrvFunctionList";

        /// <summary>
        /// 百度key
        /// </summary>
        public static readonly string PARAM_BAIDUKEY = "C898fafdc2629e5a053a4fb53c49f481";

        /// <summary>
        /// 微信API调用授权用户名
        /// </summary>
        public static readonly string CONSTRING_WEIXAPI_USERNAME = "admin";
        /// <summary>
        /// 微信API调用授权密码
        /// </summary>
        public static readonly string CONSTRING_WEIXAPI_PASSWORD = "admin";

        /// <summary>
        /// 微信服务器地址
        /// </summary>
        public static string GLOBAL_WEIXIN_SERVER_URL = "http://localhost:50003";//System.Configuration.ConfigurationManager.AppSettings["WeiXinServerUrl"] != null ? System.Configuration.ConfigurationManager.AppSettings["WeiXinServerUrl"].ToString() : "";

        /// <summary>
        /// 微信API地址
        /// </summary>
        public static string GLOBAL_WEIXIN_API_URL = GLOBAL_WEIXIN_SERVER_URL + "/WeiXinApi/ApiMethod";

        /// <summary>
        /// 图片显示地址
        /// </summary>
        public static string GLOBAL_PIC_SHOW_URL = System.Configuration.ConfigurationManager.AppSettings["picShowUrl"] != null ? System.Configuration.ConfigurationManager.AppSettings["picShowUrl"].ToString() : "";
        public static string GLOBAL_APIKEY = System.Configuration.ConfigurationManager.AppSettings["APIKEY"] != null ? System.Configuration.ConfigurationManager.AppSettings["APIKEY"].ToString() : "95763f9f5789aa95d38de12ca7ca1bc5";


        public static int CONSTRING_PAGESIZE = 10;
    }
}